<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">-->
    <title>图书管理 - angularjs版</title>

    <!-- Bootstrap -->
    <link href="bs/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body ng-app="libraryApp" ng-controller="mainController">

    <!--页面头部-->
    <div ng-include="'inc/nav.html'"></div>

    <div class="container">

        <!--菜单-->
        <!-- <div ng-include="'inc/menu.html'"></div> -->

    <div style="margin-bottom: 30px;">
        <div class="btn-group pull-left">
            <button ng-click="addBook();" type="button" class="btn btn-success">新增图书</button>
            <button ng-disabled="params.ids.length!=1" type="button" class="btn btn-warning" ng-click="modiBookClick()">修改图书</button>
            <button ng-disabled="params.ids.length==0" type="button" class="btn btn-danger" ng-click="delBookClick()">删除图书</button>
        </div>

        <div class="col-lg-6 pull-right mb-10">
            <div class="input-group">
              <input id="searchIpt" ng-model="query" type="text" class="form-control" placeholder="请输入书名">
              <span class="input-group-btn">
                <button id="searchBtn" class="btn btn-default" type="button" ng-click="seachBook()">搜索</button>
              </span>
            </div><!-- /input-group -->
        </div><!-- /.col-lg-6 -->
    </div>



        <br>

        <table class="table table-bordered table-striped table-hover">
            <tr>
                <th><input id="chkAll" type="checkbox"></th>
                <th>书名</th>
                <th>作者</th>
                <th>出版社</th>
                <th>定价</th>
                <th>出版日期</th>
                <th>类别</th>
                <th>上架/下架</th>
                <th>借出状态</th>
            </tr>
            <tr ng-repeat="book in bookList">
                <td><input ng-click="onCheckboxClick($event);" type="checkbox"></td>
                <td>{{book.name}}</td>
                <td>{{book.author}}</td>
                <td>{{book.publisher}}</td>
                <td>{{book.price}}</td>
                <td>{{book.p_date}}</td>
                <td>{{book.classify}}</td>
                <td>{{book.status}}</td>
                <td>{{book.borrow_status}}</td>
            </tr>
        </table>

        <!--分页-->

    <nav>
        <ul class="pagination pull-right">
            <li ng-click="firstPage()">
                <a href="#" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li ng-class="{true:'active'}[$index==page]" ng-click="clickPagingLi()" ng-repeat="tmpPage in pageArr"><a href="javascript:;">{{tmpPage + 1}}</a></li>
            
           <li ng-click="lastPage()">
               <a href="#" aria-label="Next">
                   <span aria-hidden="true">&raquo;</span>
               </a>
           </li>
        </ul>
    </nav>

        <!-- <div ng-include="'inc/paging.html'"></div> -->
        <!-- <div ng-include="'inc/form2.html'"></div> -->
        <div ng-include="'inc/form.html'"></div>
    </div>
    

    <script src="bs/jquery-1.11.3.min.js"></script>
    <script src="layer/layer.js"></script>
    <script src="bs/js/bootstrap.min.js"></script>

    <script src="ng/angular.min.js"></script>
    <script src="ng/angular-route.min.js"></script>
    <script src="lib/underscore/underscore-min.js"></script>
    <script src="lib/js/library-ng.js"></script>
</body>
</html>